﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：ApiRequestException.cs
// 功能描述：TongTongMall.MallWeb.ApiRepository
// 
// Create User：jym 2017/02/28
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;

namespace TongTongMall.MallWeb.ApiRepository.Domain.Exceptions
{
    public class ApiRequestException : TongTongMallException
    {
        public ApiRequestException(HttpStatusCode httpStatusCode, string apiUrl, string message)
                : base(message)
        {
            this.HttpStatusCode = httpStatusCode;
            this.RequestApiUrl = apiUrl;
        }

        /// <summary>
        /// 请求http 状态码
        /// </summary>
        public HttpStatusCode HttpStatusCode { get; set; }

        /// <summary>
        /// 请求的地址
        /// </summary>
        public string RequestApiUrl { get; set; }

        /// <summary>
        /// 错误消息
        /// </summary>
        public string ErrorMessage { get; set; }
    }
}
